var passport = require('passport'),
  LocalStrategy = require('passport-local').Strategy;
var expressLayouts = require('express-ejs-layouts');
var adminNeeded = require('../api/middleware/adminNeeded');

module.exports = {
  http: {
    customMiddleware: function (app) {
      console.log('Express middleware for passport');
      app.use(passport.initialize());
      app.use(passport.session());

      console.log('Express middleware for layout');
      app.set('layout', 'layout');
      app.use(expressLayouts);

      app.use('/admin', adminNeeded);
    }
  }
};


